//
//  DownloadManager.h
//  ImGuider
//
//  Created by llt on 2017/8/4.
//  Copyright © 2017年 AudioCtrip. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MCDownloadReceipt.h"

@interface DownloadManager : NSObject

+ (instancetype)sharedManager;

/**
 是否下载完成
 
 @param URLString 下载链接
 @return 是否完成
 */
- (BOOL)isDownloadCompletedForURLString:(NSString *)URLString;

- (NSString *)localFilePathForURLString:(NSString *)URLString;

- (long long)localFileSizeForURLString:(NSString *)URLString;

- (MCDownloadReceipt *)downloadSateForURLString:(NSString *)URLString;

- (DownloadState)downloadSateForModel:(LineModel *)model progress:(CGFloat *)progress;

/**
 增加下载
 
 @param lineModel lineModel对象
 */


/**
 增加下载
 
 @param lineModel lineModel对象
 
 */
- (void)addDownloadWithLineModel:(LineModel *)lineModel ;

/**
 停止下载，删除对象
 
 @param lineModel lineModel对象
 */
- (void)deleteDownloadWithLineModel:(LineModel *)lineModel;

/**
 停止下载，不删除对象
 
 @param lineModel lineModel对象
 */
- (void)pauseWithLineModel:(LineModel *)lineModel;

/**
 删除所有正在下载的
 */
- (void)deleteAllDownloading;


@end
